1.5 A machine learning-themed primer on causality

This book introduces readers to integrating causal inference with advanced machine learning techniques. It covers how to develop causally meaningful representations in deep learning, apply causal reasoning to reinforcement learning for improved decision-making and counterfactual analysis, and enhance large language models with causal capabilities. Utilizing practical examples, including a deep dive into an image classification task, it guides readers on moving beyond mere correlation to build more robust, interpretable, and intelligent AI systems.

This page is free — overview and chapter list only.
The complete book body is sold separately.

Full book: $2.99 USDC via x402 ·
Per chapter: $0.25 USDC

Buy / open complete book (HTML)
· Complete book Markdown (.md)

Agents: start with free /library/discovery.json, sample free teaser chapters,
then pay for individual chapters or the complete book URL above.
Append .md to any content URL for Markdown with YAML front matter.

Chapters

  1. 141 Causal Representation Learning (Free teaser)
  2. Step 2 Write Down The Causal Math ($0.25)
  3. 213 Joint Probability And Conditional Probability ($0.25)
  4. 214 The Chain Rule The Law Of Total Probability And Bayes Ru ($0.25)
  5. Discrete Vs Continuous Random Variables ($0.25)
  6. 2110 Expected Value ($0.25)
  7. 223 Coding Random Processes ($0.25)
  8. 225 Programming Probabilistic Inference ($0.25)
  9. 231 Probability Distributions As Models For Populations ($0.25)
  10. 232 From The Observed Data To The Data Generating Process ($0.25)
  11. From The Full Joint Distribution To The Data Generating Proc ($0.25)
  12. Estimating By Minimizing Other Loss Functions And Regulariza ($0.25)
  13. 242 Subjective Probability ($0.25)
  14. 311 Case Study A Causal Model For Transportation ($0.25)
  15. 313 Dags Are Useful In Communicating And Visualizing Causal ($0.25)
  16. 316 Dags Link Causality To Conditional Independence ($0.25)
  17. 319 Different Techniques For Parameter Learning ($0.25)
  18. 3111 Inference With A Trained Causal Probabilistic Machine L ($0.25)
  19. Listing 310 Creating A Dag Based On Roles In Causal Effect I ($0.25)
  20. 411 Colliders ($0.25)
  21. 421 D Separation A Gateway To Simplified Causal Analysis ($0.25)
  22. Setting Up Your Environment ($0.25)
  23. Listing 45 Chi Squared Test With Boolean Outcome ($0.25)
  24. 443 P Values Vary With The Size Of The Data ($0.25)
  25. Setting Up Your Environment 2 ($0.25)
  26. 461 Approaches To Causal Discovery ($0.25)
  27. Colliders And Discovery ($0.25)
  28. 512 Causal Abstraction And Plate Models ($0.25)
  29. 522 Setting Up The Variational Autoencoder ($0.25)
  30. Key Vae Concepts So Far ($0.25)
  31. Key Vae Concepts So Far 2 ($0.25)
  32. Incorporating Generative Ai In Causal Models Is Not Limited ($0.25)
  33. 532 Case Study Semi Supervised Learning ($0.25)
  34. Chapter Checkpoint ($0.25)
  35. 711 Case Study Predicting The Weather Vs Business Performanc ($0.25)
  36. 714 From Randomized Experiments To Interventions ($0.25)
  37. Leveraging The Parametric Flexibility Of Probabilistic Progr ($0.25)
  38. 722 Ideal Interventions In Structural Causal Models ($0.25)
  39. From Causal Language To Symbols ($0.25)
  40. 751 Random Assignment In An Experiment Is A Stochastic Inter ($0.25)
  41. 761 Reasoning About Interventions That We Cant Do In Reality ($0.25)
  42. Counterfactual Fairness ($0.25)
  43. Avoiding Confusion Between Factual And Hypothetical Conditio ($0.25)
  44. Probability Of Disablement And Enablement ($0.25)
  45. Using Counterfactuals For Segmentation ($0.25)
  46. Figure 815 Illustrates The Latter Question ($0.25)
  47. Listing 91 Installing Graphviz And Helper Functions ($0.25)
  48. Listing 97 Build The Parallel World Graphical Model ($0.25)
  49. 93 Case Study 2 Counterfactual Variational Inference ($0.25)
  50. 933 Implementing The Abduction Step With Variational Inferen ($0.25)
  51. 94 Case Study 3 Counterfactual Image Generation With A Deep ($0.25)
  52. 101 The Causal Hierarchy ($0.25)
  53. 102 Identification And The Causal Inference Workflow ($0.25)
  54. 103 Identification With Backdoor Adjustment ($0.25)
  55. 104 Graphical Identification With The Do Calculus ($0.25)
  56. 106 General Counterfactual Identification ($0.25)
  57. Repeat For Each Intervention ($0.25)
  58. 1142 Propensity Score Estimators Of The Backdoor Estimand ($0.25)
  59. 1144 Front Door Estimation ($0.25)
  60. 1151 Data Size Reduction ($0.25)
  61. 1155 Testing Robustness To Unmodeled Confounders ($0.25)
  62. 1163 Extending Inference To Estimation ($0.25)
  63. Listing 1122 Purchasesnetwork Neural Network ($0.25)
  64. 1165 Setting Up Posterior Inference With Svi ($0.25)
  65. 1166 Posterior Predictive Inference Of The Ate ($0.25)
  66. 1168 Closing Thoughts On Causal Latent Variable Models ($0.25)
  67. 1222 Causal Characterization Of Decision Rules And Policies ($0.25)
  68. Setting Up Your Environment 3 ($0.25)
  69. 1225 Newcombs Paradox ($0.25)
  70. 1233 Delayed Feedback ($0.25)
  71. 1251 Connecting Causality And Markov Decision Processes ($0.25)
  72. 1263 Making Level 3 Assumptions In Decision Problems ($0.25)
  73. Setting Up Your Environment 4 ($0.25)
  74. 1314 The Causal Frame Problem And Ai Alignment ($0.25)
  75. 1315 Understanding And Contextualizing Causal Concepts ($0.25)
  76. 1317 Beware Llms Hallucinate ($0.25)
  77. Note About Confusing Terminology ($0.25)
  78. 1332 Using Pretrained Models For Causal Markov Kernels ($0.25)
  79. 1333 Sampling From The Interventional And Observational Dist ($0.25)
  80. 1334 Closing Thoughts ($0.25)