Open-source project
datawhalechina/key-book avatar
datawhalechina/key-book

Key-Book: Companion Notes for a Chinese Machine Learning Theory Textbook

《机器学习理论导引》(宝箱书)的证明、案例、概念补充与参考文献讲解。

1,729 stars189 forksJupyter NotebookNOASSERTION

At a glance

What is it?
Key-Book is a set of open-source reading notes for the Chinese textbook "An Introduction to Theoretical Machine Learning" by Zhou Zhihua and co-authors, filling in omitted proof steps, explaining background concepts, and adding worked examples across eight theoretical topics from PAC learning to regret bounds. It is a supplement, not a standalone text.
Who is it for?
Key-Book is the right companion for researchers and graduate students working through "An Introduction to Theoretical Machine Learning" who need fuller proof derivations and concrete examples alongside the original text. It does not replace the textbook and is less useful without it.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 20 days ago.
What is it written in?
Mainly Jupyter Notebook, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Key-Book Is and Who Reads It

Key-Book is a community-written companion note set for the textbook "An Introduction to Theoretical Machine Learning" by Zhou Zhihua, Wang Wei, Gao Wei, and Zhang Lijun, published in Beijing by China Machine Press in 2020 (ISBN 978-7-111-65424-7, 204 pages). The README describes the textbook as filling a gap in Chinese-language introductory materials for machine learning theory, covering seven core theoretical concepts: learnability, complexity, generalisation bounds, stability, consistency, convergence rates, and regret bounds.

The problem the notes address is that the textbook itself is mathematically condensed. Proofs are written tersely, background concepts are assumed, and the text makes high demands on the reader's prior mathematics. Key-Book is positioned as a reading companion that explains the reasoning behind proofs, fills in omitted derivation steps, and adds concrete examples to help readers understand abstract results.

The README states three target audiences: readers currently working through the textbook who want a reference companion, researchers and students who want a systematic theoretical ML introduction, and engineers with practical ML experience who want to build theoretical foundations.

Eight Chapters and the Theoretical Topics They Cover

The notes follow the structure of the textbook chapter by chapter. A preface covers computability and learnability as foundational ideas before the main text begins.

Chapter 1 covers prerequisite mathematics: probability inequalities and basic mathematical tools. Chapter 2 addresses learnability through the PAC learning framework and learning theory. Chapter 3 covers complexity measures including VC dimension, Natarajan dimension, and Rademacher complexity. Chapter 4 discusses generalisation bounds derived from both the PAC framework and Rademacher complexity.

Chapter 5 examines algorithmic stability and its relationship to generalisation. Chapter 6 covers consistency, specifically the conditions for convergence to the Bayes optimal classifier. Chapter 7 addresses convergence rates in optimisation algorithms. Chapter 8 covers regret bounds in online learning.

An appendix covers supporting mathematics including norms, convex sets, and optimisation. A references section is also included. The notes are hosted online at datawhalechina.github.io/key-book/ and are also available as a PDF download from the repository's release page.

Accessing and Building the Notes

The primary access method is the online reader at datawhalechina.github.io/key-book/, which requires no setup. The repository also provides a PDF download through the GitHub releases page, labelled as a preview release issued on 2025-03-26.

For contributors or developers who want to build the site locally, the repository uses VitePress. The package.json shows three npm scripts:

bash
npm run dev
npm run build
npm run preview

The dev script runs `vitepress dev docs`, the build script runs `vitepress build docs`, and the preview script runs `vitepress preview docs`. Node.js 18 or later is required, as specified in the package.json engines field. The site content lives in the docs/ directory, and VitePress configuration handles the navigation structure. Dependencies include `vitepress`, `vue`, and `markdown-it-mathjax3` for rendering the mathematical notation found throughout the notes.

The repository is not a Python package or installable library. It is a documentation project. Readers who only want to study the content should use the online reader or download the PDF rather than building locally.

Mathematical Prerequisites and Limitations

Key-Book explicitly aims to lower the entry barrier relative to the original textbook. However, it is still pitched at readers with a solid mathematics background. The README notes the textbook requires a high level of mathematical background, and Key-Book supplements rather than replaces that requirement. Topics like VC dimension, Rademacher complexity, and PAC learning bounds assume familiarity with probability theory, basic functional analysis, and combinatorics.

A reader who has not yet studied probability theory, linear algebra, or basic real analysis will find Key-Book inaccessible regardless of the companion notes. The README is clear that the primary readers are researchers and students, not beginners or practitioners who want intuitive explanations without formal proofs.

A second limitation is coverage. The notes cover eight chapters matching the textbook's structure, but the README does not claim complete coverage of every theorem or exercise in the book. Some supplementary explanations may be briefer than others depending on contributor availability.

Relationship to the Pumpkin Book Sister Project

The README explicitly links Key-Book to a sister project called Pumpkin Book (南瓜书), also maintained by Datawhale. The two projects address different source texts.

Pumpkin Book is a companion to Zhou Zhihua's "Machine Learning" textbook (also known as the Melon Book or Watermelon Book), which is the broader introductory textbook on machine learning methods and algorithms. Key-Book is a companion to the theory-focused sequel, "An Introduction to Theoretical Machine Learning." A reader who wants practical ML methods covered in depth would look to the Pumpkin Book; a reader who wants to understand the theoretical guarantees behind learning algorithms would use Key-Book.

Both projects follow the same general format: community-written supplementary notes for dense academic texts that benefit from additional explanation. Neither is a primary resource on its own.

Maintenance and License

The repository is not archived. The last push was on 2026-09-09. A preview PDF release was made on 2025-03-26. The project has an editorial board listed in the README: two chief editors and four associate editors, with one acknowledgement contributor. Contributions are accepted through GitHub issues and pull requests, following the Datawhale open-source project guidelines.

The license is Creative Commons Attribution Non-Commercial ShareAlike 4.0 International (CC BY-NC-SA 4.0). This means the notes can be read, shared, and adapted freely for non-commercial use, provided attribution is given and derivative works use the same license. Commercial use is not permitted under this license. The pyproject.toml confirms the CC-BY-NC-SA-4.0 license identifier.

Editorial conclusion

Key-Book is the right companion for researchers and graduate students working through "An Introduction to Theoretical Machine Learning" who need fuller proof derivations and concrete examples alongside the original text. It does not replace the textbook and is less useful without it. The CC BY-NC-SA 4.0 license means it can be studied and shared freely for non-commercial purposes.

Frequently asked questions

Is Key-Book usable without the original textbook?

The README positions Key-Book as a companion reading note, not a standalone text. It supplements proofs and concepts from the textbook but does not reproduce the original theorems or definitions in full.

Which textbook does Key-Book supplement?

Key-Book supplements "An Introduction to Theoretical Machine Learning" by Zhou Zhihua, Wang Wei, Gao Wei, and Zhang Lijun, published by China Machine Press in 2020 (ISBN 978-7-111-65424-7). This is a different book from Zhou Zhihua's broader ML textbook that the Pumpkin Book accompanies.

Can I download Key-Book as a PDF?

A PDF is available from the GitHub releases page. The README lists a PDF download link pointing to the preview release, issued on 2025-03-26. The online version at datawhalechina.github.io/key-book/ is also freely accessible.

Official sources

  1. datawhalechina/key-book on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/datawhalechina-key-book.svg)](https://hysenlabs.com/projects/datawhalechina-key-book)
Community notes

Community notes