Key-book: A Companion Notebook Set for An Introduction to Theoretical Machine Learning
《机器学习理论导引》(宝箱书)的证明、案例、概念补充与参考文献讲解。
At a glance
- What is it?
- Datawhale's Key-book annotates Zhou Zhihua's machine learning theory textbook with concept notes, filled-in proofs and worked examples. It is a reading aid for one specific Chinese-language book, not a standalone course, and its CC BY-NC-SA 4.0 terms rule out commercial reuse.
- Who is it for?
- Adopt Key-book if you already own the 2020 print edition (ISBN 978-7-111-65424-7) and are stuck on a specific proof in the PAC, VC dimension, stability, consistency, convergence rate or regret chapters. Do not adopt it if you want a self-contained theory course, if you cannot read Chinese, or if your use is commercial, since the licence is CC BY-NC-SA 4.0 and the repository carries NOASSERTION.
- 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 6 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 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
A reading companion for one specific Chinese theory textbook
Zhou Zhihua, Wang Wei, Gao Wei and Zhang Lijun published An Introduction to Theoretical Machine Learning through China Machine Press in May 2020. The README describes the book as filling a gap: before it, Chinese readers had few introductory texts on learning theory. It covers seven core concepts, listed in the README as learnability, complexity, generalization bounds, stability, consistency, convergence rates and regret bounds. The book is 204 pages and dense. The README states plainly that the proofs are terse and the mathematical prerequisites are high, which is the problem Key-book exists to address.
Key-book is not a replacement for the textbook. It is a set of companion notes organised chapter by chapter against the original. The README names three kinds of supplement: explaining concepts the textbook uses without defining, filling in derivation steps the textbook omits, and adding worked examples to make abstract results concrete. That framing matters for adoption. You need the textbook open beside it. A reader who does not own the book will find the notes decontextualised, because the notes reference the textbook's numbering and argument order rather than restating it.
What the eleven chapter pages actually cover
The table of contents maps to eleven pages on the hosted site, each a separate URL under datawhalechina.github.io/key-book. The preface is a discussion of computability versus learnability. Chapter 1 collects probability inequalities and basic mathematical tools. Chapter 2 covers the PAC learning framework. Chapter 3 handles VC dimension, the Natarajan dimension and Rademacher complexity. Chapter 4 applies PAC and Rademacher results to generalization guarantees. Chapter 5 links algorithmic stability to generalization. Chapter 6 covers the conditions under which a learner converges to the Bayes optimal classifier. Chapter 7 analyses convergence rates of optimization algorithms. Chapter 8 covers regret bounds in online learning. An appendix collects norms, convex sets and optimization background, and a reference page lists the bibliography.
The structure follows the textbook one-to-one, which is the right choice for a companion but also the main constraint. There is no separate index by concept, no cross-chapter glossary and no problem set. If you want to look up Rademacher complexity without knowing it lives in chapter 3, the site navigation does not help you. The appendix partially compensates for missing mathematical background, but the README does not describe what it assumes you already know, so a reader without a probability course will have to judge that for themselves.
How the notes are built and published
The primary language of the repository is Jupyter Notebook. That is consistent with a project whose content is mathematical derivations: notebooks let the authors mix LaTeX, prose and executable cells in one file. The default branch is master. The hosted site at datawhalechina.github.io/key-book serves the rendered chapters, and the release tagged preview, dated 26 March 2025, provides a compiled PDF at the release download path key_book.pdf. The preview tag name suggests the PDF is not treated as a stable numbered edition, and there is no second release in the material, so anyone citing page numbers should cite the chapter URL instead.
Because the source is notebooks, contributions arrive as pull requests against individual chapter files, and the README points contributors at the Datawhale open project guide for process. For a reader this means the hosted HTML and the PDF can drift apart between the PDF's build date and the current master. If you are working through a proof and the PDF disagrees with the site, the site is the more current artefact.
Getting the notebooks running locally
The README does not document a local build. It offers two consumption paths: read online at the GitHub Pages URL, or download the PDF from the preview release. There is no stated requirements file, no documented make target and no pinned Python or Jupyter version in the supplied material, so a reproducible local environment cannot be described from what is here. Anyone who wants to run the notebooks rather than read them should clone the repository, inspect the notebook metadata for the kernel and dependency list, and treat that inspection as the setup step.
For most readers the hosted site is the correct entry point, because the value is in the rendered mathematics rather than in execution. The notebooks are a writing format here, not a lab. Nothing in the README suggests the cells are meant to be run to produce results you would cite. That is a meaningful distinction from projects where the notebook is the deliverable artefact and reproducibility of outputs is part of the promise.
Where Key-book stops being the right tool
The most obvious limit is language. Every chapter, the preface, the appendix and the reference list are in Chinese, and the site is organised around a Chinese-language textbook. An engineer who cannot read Chinese gets nothing from this repository, and there is no indication of a translation effort in the material.
The second limit is scope. Key-book annotates one book. It does not cover statistical learning theory beyond what that book covers, it does not discuss deep learning generalization empirically, and it does not connect the theory to practice. A reader hoping to move from VC dimension to a decision about model selection will not find that bridge here. The README's own description of the audience is narrow: people currently reading the textbook, students who want a systematic introduction to the theory, and engineers who already have practical machine learning experience and want the theory underneath it.
The third limit is the uneven depth that any annotation project accumulates. The README promises three kinds of supplement across all chapters, but it does not say how much of each chapter is annotated. Proofs that the original states fully may get a short note; proofs the original compresses may get several pages. You cannot tell from the table of contents which is which.
How it differs from the pumpkin-book approach
Datawhale's earlier project, pumpkin-book, is described in the README as the sister volume. It accompanies Zhou Zhihua's Machine Learning, known as the watermelon book, which is an introductory machine learning text with derivations that readers frequently find under-explained. Pumpkin-book fills in those derivations. Key-book applies the same annotation pattern to a different and harder book, the theory introduction rather than the general textbook.
The difference in approach is small but real. Pumpkin-book's source book is broad and applied; the derivations it supplements are mostly algebra and optimization steps in methods like support vector machines and neural networks. Key-book's source book is narrow and theoretical; the material it supplements is proof technique in PAC learning, complexity measures and stability arguments. That means the two projects do not substitute for each other and a reader working through both books would use both. The shared pattern also means the shared weakness: both depend on the reader having the source book, and neither stands alone as a course.
Licence, maintenance and the cost of relying on it
The README states the work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International. Two consequences follow directly from that text. Commercial use is excluded, so a paid course, an internal corporate training deck or a commercial study platform cannot reuse the material under these terms. And ShareAlike means derivative works must carry the same licence, which constrains how you can republish adapted notes. The repository metadata reports the licence as NOASSERTION, which means the machine-readable detection did not match a standard identifier even though the README names one. If you need certainty for a redistribution plan, resolve that discrepancy rather than assuming the README text governs.
Maintenance cost for a reader is close to zero. There is no library to upgrade, no API to track and no dependency to patch. The cost sits on the other side: because the notes are tied to a fixed 2020 print edition, the content is stable, and the project's own activity is the only variable. The last push recorded is 9 September 2026, and the only release is the preview PDF from March 2025. A reader who needs a stable citable version should pin to the preview PDF and note its date, while a reader who wants the most complete notes should use the hosted chapter pages. This is a companion to a printed book, so its useful life is bounded by the book's, not by a software release cycle.
Editorial conclusion
Adopt Key-book if you already own the 2020 print edition (ISBN 978-7-111-65424-7) and are stuck on a specific proof in the PAC, VC dimension, stability, consistency, convergence rate or regret chapters. Do not adopt it if you want a self-contained theory course, if you cannot read Chinese, or if your use is commercial, since the licence is CC BY-NC-SA 4.0 and the repository carries NOASSERTION. Before relying on it, open the chapter page for the section you need and check whether the proof you are stuck on is actually annotated there, because coverage is uneven across chapters and the notes are written against one specific edition.
Community notes