Figures v
Preface vi
Part I. Traces of Machine Learning Systems 1
1. The Inversion 2
2. Trace Analysis Patterns in Brief 8
3. Three Strata 14
4. The Training Loop as a Trace 20
5. Loss Curves and Counter Values 30
6. Data Pipelines and Loaders 40
7. Checkpoints, Resumption, and Truncated Traces 48
8. Distributed Training as Threads of Activity 56
9. Inference Serving Traces 67
10. Agentic Runs 75
11. Evaluation and Experiment Traces 87
12. Anomalies in Machine Learning System Traces 93
Part II. Machine Learning as Trace 104
13. The Forward Pass as a Trace 105
14. Tokenization as Text Trace 114
15. Embeddings as Message Embedding 120
16. Attention as Message Context 125
17. The Backward Pass as an Adjoint Thread 135
18. Parameter Updates as a Long Trace 141
19. Dropout, Masks, and Silent Messages 146
20. Batches as Strands of Activity 151
21. Generation as Trace Production 155
22. Generalization, Memorization, and Motifs 162
23. What a Checkpoint Records 167
Part III. Connections, Borrowings, and Limits 179
24. Interpretability as Trace Analysis 180
25. Observability for Machine Learning 187
26. Patterns the Language Borrowed from Machine Learning 196
27. Four Directions, One Table 202
28. Limits of Formalization 206
Appendix A. Pattern Glosses 215
Appendix B. Coverage of the Pattern Language 239
Glossary 258
Notes and Sources 265
References 273
Index 281