Safe Learning: a practical mathematical book

From rebuilding mathematical confidence to reasoning about learning systems that must respect constraints

Begin with a question you can answer

If the notation feels unfamiliar, start with Chapter 0: mathematical language. If you can manipulate expressions but lose track of their meaning, use the chapter application labs: each begins with a concrete decision, introduces a model, works through the mathematics and interprets the result. The short readiness checks help locate a specific gap without turning the book into an entrance exam.

In this book
What this book teachesHow to study a chapterThe complete reading pathConnected applications and projectsHow to judge your progressConventions and evidence

What this book teaches

A learning algorithm can optimize the quantity it was given and still make an unacceptable decision. A controller can perform well in a simulation and still fail when a sensor is delayed. A classifier can have high test accuracy without a useful guarantee near one particular input. The mathematics of safe learning starts by specifying the decision, the uncertainty and the precise claim to be established.

This book builds the tools needed to do that work. Six foundation chapters explain the language of proofs, linear algebra, optimization, probability, feedback systems and learning models. Fifteen later chapters develop constrained learning, safe exploration, control certificates and neural-network verification. Each chapter keeps a route through its essential ideas, worked calculations, interactive experiments, graded practice and more advanced material for a second reading.

The intended starting point is familiarity with elementary algebra, a first linear-algebra course and single-variable derivatives. You do not need to remember them fluently. The opening refreshers and exercises rebuild those skills. You also do not need a previous course in reinforcement learning, control theory or Gaussian processes: their definitions are developed before the later chapters use them.

There are two goals. First, become able to carry out a calculation and explain why each step is valid. Second, become able to ask whether the calculation answers the engineering question. The second skill requires identifying assumptions, choosing units, looking for counterexamples and recognizing when an apparently reassuring number is not the needed guarantee.

How to study a chapter

  1. Predict before calculating. Read the scenario and say what increasing an error bound, tightening a constraint or changing a norm should do. A wrong prediction is useful: it gives the derivation something specific to resolve.
  2. Read with a small model beside you. Write the variables and their units. Copy a worked example, leaving enough room to fill in every omitted multiplication or inequality. A matrix equation becomes less intimidating when its dimensions are visible.
  3. Use the chapter’s two layers. The main sections develop definitions, arguments and methods. The application lab near the exercises joins those ideas into a decision. Optional proof and literature boxes can wait until you can explain the core calculation.
  4. Attempt, hint, check, reconstruct. Try an exercise before opening its hint. Use the solution to diagnose the first incorrect step, then close it and solve again. Copying a correct answer does not test whether you can recover the reasoning.
  5. Transfer the method. Change a parameter, an uncertainty model or the actual requirement. Ask which line of the solution changes first. The harder application exercises are designed for this step.

One useful session is a small concept block, one worked example and two attempted exercises. When a topic takes several sessions, return to its definitions and a previously solved example before continuing. These are study suggestions, not a prescribed timetable. Let your ability to explain and reconstruct determine the pace.

The complete reading path

Read the parts in order for the fullest route. Within a focused track, follow every unfamiliar prerequisite link. Each application link below takes you directly to a chapter’s practical synthesis; the chapter title opens its beginning.

Part I — Mathematical foundations

Part II — Safety and the mathematical toolkit

Part III — Safe exploration

Part IV — Constrained learning and control

Part V — Certified neural networks and verification

Connected applications and projects

The examples use several recurring settings: noisy sensors, controlled temperature, robots near boundaries, constrained operating policies and learned decision scores. They are deliberately simplified teaching models with constructed numbers. Their value is that you can inspect the entire reasoning, including where the model stops being informative.

Each project includes a fully worked route and further exercises with hints and explained solutions. The projects do not ask you to operate a physical system. They ask you to build a model, make a decision within it and audit the resulting claim.

How to judge your progress

You are ready to move on when you can do four things: explain the main idea without reading its definition, solve a routine problem, solve a changed version of that problem, and identify an assumption whose removal breaks the conclusion. If only the algebra fails, return to a worked calculation. If the assumptions feel arbitrary, return to the counterexample or common-mistake discussion.

StageEvidence you can produce
FoundationsCompute a norm, derivative, conditional probability and one-step state update; explain their dimensions and meaning.
ModelingTranslate a verbal requirement into a constraint and describe the uncertainty that the constraint quantifies over.
CertificationFollow an invariant-set or optimization argument and locate the assumptions used at each critical step.
Independent useComplete a project, check its calculations, and explain both its guarantee and its limitations in ordinary language.

Keep a short error log: the mistaken step, why it failed, and a corrected example. Distinguish a notation error from a modeling error. Confusing an expectation with a worst-case bound is a different problem from dropping a minus sign, even when both lead to a wrong answer.

Conventions and evidence

The glossary connects recurring terms to examples and their full definitions. The formula sheet collects the reference mathematics; it is most useful after you understand a chapter’s derivations. In a theorem, read the assumptions as part of the statement. “For all disturbances” and “with probability at least 0.95” are different quantifiers. A norm must be specified, a horizon must be identified, and a probability must refer to a stated source of randomness.

Worked engineering examples are hypothetical unless explicitly described otherwise. A bound proved within such a model is not empirical validation of that model. A simulation illustrates behavior for its chosen inputs; it does not establish a universal claim. Likewise, local Lean proofs check their encoded statements and assumptions, while the coverage records identify the remaining formalization gaps. The new application material has its own arithmetic and review records rather than inheriting a blanket verification claim.

To print a chapter, use your browser’s print command. The print layout opens worked details and proof boxes so that a saved chapter includes the reasoning as well as the question. Interactive calculations remain available in the online chapter. Begin with Chapter 0, or choose your starting point with the study guide.