Kick off your book project in 3 hours! Live workshop on Zoom. You’ll leave with a real book project, progress on your first chapter, and a clear plan to keep going. Saturday, June 6, 2026. Learn more…

Leanpub Header

Skip to main content

Principles of Explainable Artificial Intelligence Theory Models & Proofs VOL-1

This book is 100% completeLast updated on 2026-05-19

WHO SHOULD READ THIS BOOK?

This book is ideal for:

·        BCA, MCA, B.Tech, M.Tech students

·        UGC NET aspirants

·        AI/ML researchers

·        Data scientists

·        AI developers

·        University professors

·        PhD scholars

·        Industry professionals working with black-box models

·        Anyone who wants mathematical clarity on XAI

Its writing style balances mathematical rigor with readability, making it useful for self-study and classroom use.

TEACHING & LEARNING BENEFITS

·        50+ diagrams, proofs, and mathematical derivations.

·        Step-by-step logical flow for each model.

·        Case studies from healthcare, finance, law, and engineering.

·        Practical coding references (without over-reliance on tools).

·        Integration of statistics, calculus, causality, and deep learning.

·        Real-world examples for intuitive understanding.

·        Problems at the end of each chapter (optional addition).

Instructors can adopt this book for academic courses in:

·        Explainable AI

·        Machine Learning

·        Statistical Inference

·        Causality

·        Artificial Intelligence Foundations

·        Deep Learning Interpretability

UNIQUE CONTRIBUTIONS OF THIS BOOK

Unlike other XAI or ML books, this work by Anshuman Mishra offers:

·        Mathematical derivations for SHAP, IG, LIME, and other explainability tools.

·        Original proofs for fairness properties in attribution methods.

·        Detailed causal diagrams and do-calculus explanations.

·        A structured approach to XAI evaluation metrics.

·        Coverage of transformer explainability—rare in academic books.

·        Clarity in blending classical mathematical theory with modern AI systems.

This makes the book a reference-level resource for the next decade of AI learning.

Minimum price

$9.99

$19.99

You pay

Author earns

$
PDF
EPUB
About

About

About the Book

Explainable Artificial Intelligence (XAI) has rapidly evolved into one of the most critical dimensions of modern AI research. As deep learning models have grown in size, complexity, and power, the opacity of their decision-making processes has raised significant concerns regarding fairness, accountability, regulatory compliance, trustworthiness, and ethical use. This book, Principles of Explainable Artificial Intelligence: Theory, Models & Proofs, written by Anshuman Mishra, addresses this global need by presenting a mathematically grounded, logically rigorous, and research-centric exploration of XAI principles.

The book is designed not only for students and beginners but also for researchers, practitioners, faculty members, competitive exam aspirants, and professionals seeking deep mathematical understanding behind the explainability mechanisms of AI systems. It emphasizes the foundational structures of interpretability—causal reasoning, attribution theory, game-theoretic fairness, statistical transparency, and formal mathematical proofs.

Rather than treating explainability tools like SHAP, LIME, or Grad-CAM as black-box techniques, this book dissects why these methods work, how they are derived mathematically, and what theoretical foundations justify their use. By combining classical mathematics, probability theory, statistical modeling, causal inference, and computational reasoning, this book enables the reader to understand explainability as a formal scientific discipline.

THE PURPOSE OF THIS BOOK

The primary objective of this book is to bridge the gap between “practical explainability tools” and the deep mathematical frameworks upon which they are built. Many books in the market offer high-level descriptions or code-based tutorials on XAI techniques. However, few provide a rigorous mathematical treatment of the field.

This book offers:

·        A clear understanding of the mathematical foundations behind explainability.

·        Detailed proofs explaining why certain XAI methods satisfy fairness or attribution properties.

·        Derivations of Shapley values from cooperative game theory.

·        Detailed causal reasoning with do-calculus, DAGs, interventions, and counterfactuals.

·        Gradient-level interpretability used in deep learning and large language models.

·        Evaluation metrics with formal definitions and proofs.

·        Demonstrations of how statistical inference and causality form the backbone of transparency in AI.

The content ensures that readers master both theory and practical implementation, making it ideal for academic coursework, university syllabi, independent research, and data science industry roles.

WHY EXPLAINABLE AI IS NECESSARY

As AI systems increasingly influence critical decision-making areas—healthcare diagnoses, financial risk assessments, loan approvals, autonomous driving, medical imaging, legal judgments, industrial automation, and more—transparency becomes essential.

This book argues that explainability is not an optional feature; it is a fundamental requirement grounded in:

1.      Ethics: Preventing discrimination and biases in model outcomes.

2.      Trust: Helping users understand and trust AI-driven decisions.

3.      Accountability: Allowing organizations to justify automated decisions.

4.      Regulatory Compliance: Laws such as the EU AI Act, GDPR, and emerging Indian AI policies demand transparent AI.

5.      Debugging & Improvement: Interpretability helps identify model weaknesses and data inconsistencies.

6.      Safety: Especially crucial in autonomous and medical systems.

By combining mathematics with ethics and practical industry requirements, the book provides a holistic understanding of the need for explainability.

WHAT THIS BOOK OFFERS

This book is divided into well-structured parts that build knowledge progressively:

1. Mathematical Foundations

Readers begin with essential concepts—set theory, linear algebra, vector spaces, calculus, probability distributions, loss functions, gradients, optimization mechanics, and statistical inference techniques. These chapters ensure strong grounding for deeper XAI topics.

2. Statistical Explainability & Transparency

This part explores how statistical relationships help interpret AI models. Concepts such as covariance, multicollinearity, variance decomposition, likelihood estimation, confidence intervals, hypothesis tests, and uncertainty quantification become tools for transparency.

3. Causality and Reasoning

Judea Pearl’s causal hierarchy—association, intervention, and counterfactuals—is explained through examples, DAGs, do-calculus, backdoor/frontdoor criteria, instrumental variables, and causal discovery algorithms. This section links causal explainability with real-world decision systems.

4. Shapley Values and Attribution Theory

A full, mathematically rich exploration of cooperative game theory leads into Shapley values. From axiomatic definitions to uniqueness theorems and fairness proofs, readers understand feature attribution at a foundational level. Kernel SHAP, Tree SHAP, Deep SHAP, and Gradient SHAP are explained systematically.

5. Interpretability in Classical & Deep Learning Models

Readers learn rule extraction, decision trees, gradients, saliency maps, Grad-CAM, LRP, visualization techniques, attention-based interpretability, and transformer-level explanations.

6. Fairness, Ethics & Evaluation Metrics

Explainability must be measured and validated. The book explores sensitivity, completeness, consistency, fidelity, and human-centered metrics with mathematical rigor. Fairness and bias mitigation techniques are addressed clearly.

7. Explainability for Large Language Models

Special emphasis is placed on modern transformer-based architectures (e.g., GPT-type and BERT-type models). Mechanistic interpretability, attribution at token level, head-level analysis, and probing are covered.

8. Future Directions

Neuro-symbolic reasoning, causal-explainable AI integration, formal verification, explainability under regulations, interpreting AI safety, and open problems in research.

WHO SHOULD READ THIS BOOK?

This book is ideal for:

·        BCA, MCA, B.Tech, M.Tech students

·        UGC NET aspirants

·        AI/ML researchers

·        Data scientists

·        AI developers

·        University professors

·        PhD scholars

·        Industry professionals working with black-box models

·        Anyone who wants mathematical clarity on XAI

Its writing style balances mathematical rigor with readability, making it useful for self-study and classroom use.

TEACHING & LEARNING BENEFITS

·        50+ diagrams, proofs, and mathematical derivations.

·        Step-by-step logical flow for each model.

·        Case studies from healthcare, finance, law, and engineering.

·        Practical coding references (without over-reliance on tools).

·        Integration of statistics, calculus, causality, and deep learning.

·        Real-world examples for intuitive understanding.

·        Problems at the end of each chapter (optional addition).

Instructors can adopt this book for academic courses in:

·        Explainable AI

·        Machine Learning

·        Statistical Inference

·        Causality

·        Artificial Intelligence Foundations

·        Deep Learning Interpretability

UNIQUE CONTRIBUTIONS OF THIS BOOK

Unlike other XAI or ML books, this work by Anshuman Mishra offers:

·        Mathematical derivations for SHAP, IG, LIME, and other explainability tools.

·        Original proofs for fairness properties in attribution methods.

·        Detailed causal diagrams and do-calculus explanations.

·        A structured approach to XAI evaluation metrics.

·        Coverage of transformer explainability—rare in academic books.

·        Clarity in blending classical mathematical theory with modern AI systems.

This makes the book a reference-level resource for the next decade of AI learning.

Author

About the Author

Anshuman Mishra

Anshuman Kumar Mishra, M.Tech (Computer Science) Assistant Professor, Doranda College, Ranchi University

Prolific Author of 50+ Books on AI, Machine Learning & Computer Science | 20+ Years Experience

Anshuman Kumar Mishra is a dedicated educator, researcher, and highly prolific author with over 20 years of experience in Computer Science and Information Technology. Holding an M.Tech in Computer Science from BIT Mesra, he brings a rare combination of academic depth and practical teaching expertise.

Currently serving as Assistant Professor at Doranda College under Ranchi University, he has mentored thousands of students, helping them build strong foundations in programming, data science, and artificial intelligence. His student-centric teaching style emphasizes conceptual clarity, hands-on practice, and real-world application.

Anshuman is a prolific author with more than 50 books published across a wide spectrum of computer science and emerging technology domains. From foundational programming languages to advanced topics in Artificial Intelligence, Machine Learning, Reinforcement Learning, Decision Theory, and Computer Vision — his books are widely appreciated by students, educators, and professionals for their clear explanations, strong theoretical foundation, and practical approach.

His extensive body of work reflects his deep commitment to making complex subjects accessible and meaningful for learners at all levels. He is particularly recognized for creating well-structured learning paths that help readers progress from beginner to advanced levels with confidence.

Driven by the mission to democratize quality technical education, Anshuman continues to write and update books that bridge the gap between academic theory and industry practice.

When not teaching or writing, he actively follows and explores new developments in AI, Quantum Machine Learning, and Ethical Intelligence systems.

Contents

Table of Contents

Principles of Explainable Artificial Intelligence: Theory, Models & Proofs VOL-1 ________________________________________ Table of Contents ________________________________________ PART I — FOUNDATIONS OF EXPLAINABLE AI ________________________________________ Chapter 1: Introduction to Explainable Artificial Intelligence 1-28 1.1 Understanding Explainable AI (XAI) 1.2 Black-Box vs. White-Box Models 1.3 Global and Local Explanations 1.4 Importance of Transparency in ML Models 1.5 Ethical, Legal, and Social Need for Explainability 1.6 Mathematical Rigor in Explainable AI 1.7 Trustworthiness, Robustness & Interpretability Goals 1.8 Challenges in Building Explainable Systems ________________________________________ Chapter 2: Mathematical Preliminaries 29-55 2.1 Set Theory & Function Spaces 2.2 Vector Spaces & Linear Algebra Foundations 2.3 Probability Theory & Random Variables 2.4 Statistical Expectations, Moments & Variance 2.5 Optimization Principles for XAI 2.6 Gradient-Based Computations 2.7 Measure Theory (Basic Concepts for XAI) 2.8 Distance Metrics & Feature Similarity ________________________________________ PART II — STATISTICAL FOUNDATIONS OF EXPLAINABILITY ________________________________________ Chapter 3: Statistical Explainability 56-84 3.1 Probability Distributions in Model Interpretability 3.2 Bias-Variance Decomposition 3.3 Feature Interactions and Multicollinearity 3.4 Covariance, Correlation & Statistical Dependence 3.5 Uncertainty Quantification in ML Models 3.6 Likelihood, Confidence Intervals & Estimation 3.7 Hypothesis Testing for Explainability 3.8 Statistical Transparency in Decision Processes ________________________________________ Chapter 4: Interpretable Statistical Models 85-113 4.1 Linear Regression Explainability 4.2 Logistic Regression & Odds Ratio Interpretation 4.3 Generalized Linear Models (GLMs) 4.4 Bayesian Models & Posterior Explainability 4.5 Feature Selection using Statistical Tests 4.6 Regularization-Based Interpretability (L1, L2) 4.7 Interpretable Uncertainty Estimation 4.8 Comparison Between Statistical & ML Explanations ________________________________________ PART III — CAUSALITY AND TRANSPARENT DECISION SYSTEMS ________________________________________ Chapter 5: Introduction to Causality 114-139 5.1 Correlation vs. Causation 5.2 Structural Causal Models (SCM) 5.3 Directed Acyclic Graphs (DAGs) 5.4 Causal Hierarchy (Association → Intervention → Counterfactuals) 5.5 Confounding, Mediation & Moderation 5.6 Identifiability and Causal Assumptions 5.7 Causal Reasoning in ML 5.8 Causality as a Tool for Explainability ________________________________________ Chapter 6: Pearl’s Causal Framework 140-172 6.1 Do-Calculus Rules 6.2 Backdoor Criterion 6.3 Frontdoor Criterion 6.4 Instrumental Variables 6.5 Causal Estimands 6.6 Causal Graph Manipulation 6.7 Applications in XAI 6.8 Mathematical Proofs of Identifiability ________________________________________ Chapter 7: Causal Discovery & Learning 173-197 7.1 Constraint-Based Discovery: PC & FCI Algorithms 7.2 Score-Based Approaches: GES, BIC Scoring 7.3 Functional Causal Models 7.4 Time-Series Causality: Granger Tests 7.5 Causal Feature Selection 7.6 Learning Causal DAGs from Data 7.7 Interventions for Explanability 7.8 Practical Examples and Case Studies ________________________________________ PART IV — MATHEMATICAL ATTRIBUTION & SHAPLEY VALUES ________________________________________ Chapter 8: Game Theory Foundations 198-228 8.1 Cooperative Game Theory Basics 8.2 Utility & Payoff Distribution 8.3 Characteristic Functions 8.4 Fairness Axioms 8.5 Allocation Rules 8.6 Efficiency & Symmetry Principles 8.7 Marginal Contributions 8.8 Mathematical Proofs in Game Theory ________________________________________ Chapter 9: Shapley Values — Theory & Properties 229-262 9.1 Definition of Shapley Value 9.2 Derivation from Cooperative Games 9.3 Axiomatic Properties of Shapley Values 9.4 Additivity, Efficiency & Dummy Properties 9.5 Feature Attribution Using Shapley Values 9.6 Mathematical Uniqueness Theorem 9.7 Computational Complexity 9.8 Limitations & Interpretational Issues ________________________________________ Chapter 10: SHAP Framework and Extensions 263-291 10.1 Kernel SHAP 10.2 Tree SHAP 10.3 Deep SHAP 10.4 Gradient SHAP 10.5 Sampling Strategies for SHAP 10.6 Model-Specific vs. Model-Agnostic SHAP 10.7 Visualization Techniques 10.8 Common Pitfalls in SHAP-based Interpretation ________________________________________ Chapter 11: Attribution Methods Beyond Shapley VOL-2 11.1 LIME: Local Interpretable Models 11.2 Integrated Gradients (IG) 11.3 DeepLIFT 11.4 Anchors Explanations 11.5 Feature Interaction Scores 11.6 Concept Activation Vectors (TCAV) 11.7 Perturbation-Based Attribution 11.8 Mathematical Comparisons of Attribution Methods ________________________________________ PART V — INTERPRETABILITY IN MACHINE LEARNING & DEEP LEARNING ________________________________________ Chapter 12: Interpretability in Classical ML VOL-2 12.1 Decision Trees & Rule Extraction 12.2 Random Forest Explanation Tools 12.3 Gradient Boosting Models 12.4 SVM Interpretability 12.5 KNN & Distance-Based Explainability 12.6 Feature Importance Measures 12.7 Partial Dependence Plots (PDP) 12.8 ICE Curves & ALE Plots ________________________________________ Chapter 13: Explainability for Deep Learning Models VOL-2 13.1 Neural Network Representations 13.2 Gradient-Based Explainability 13.3 Saliency Maps & SmoothGrad 13.4 Grad-CAM & Grad-CAM++ 13.5 Layerwise Relevance Propagation (LRP) 13.6 Deep Visualization Methods 13.7 Interpretable Embeddings 13.8 Proof-Based Evaluation of Deep Explanations ________________________________________ Chapter 14: Explainability in NLP & Vision VOL-2 14.1 Interpretability for Transformer Models 14.2 Attention Mechanisms as Explanations 14.3 Attribution in LLMs 14.4 Explainability in CNN-based Vision Models 14.5 Text Classification Explainability 14.6 Vision-Based Saliency Maps 14.7 Token Attribution Techniques 14.8 Human Interpretation of Visual Explanations ________________________________________ PART VI — EVALUATION, ETHICS & REAL-WORLD INTEGRATION ________________________________________ Chapter 15: Evaluation Metrics for Explainability VOL-2 15.1 Fidelity 15.2 Stability 15.3 Completeness 15.4 Consistency & Sensitivity 15.5 Human Interpretability Measures 15.6 Quantitative Metrics 15.7 Qualitative Metrics 15.8 Benchmarking Explainability Models ________________________________________ Chapter 16: Fairness, Bias & Robustness VOL-2 16.1 Types of Bias in Data & Models 16.2 Statistical Parity & Fairness Tests 16.3 Bias Mitigation Through Explainability 16.4 Robustness in Thin Data Regions 16.5 Explainability for Trustworthy AI 16.6 Adversarial Robustness & XAI 16.7 Ethical AI Principles 16.8 Transparency for Regulation Compliance ________________________________________ Chapter 17: Real-World Applications of Explainable AI VOL-2 17.1 Healthcare Decision Systems 17.2 Financial Risk & Fraud Detection 17.3 Legal & Criminal Justice 17.4 Autonomous Vehicles 17.5 Manufacturing & Industrial Systems 17.6 Agriculture & Climate Modeling 17.7 Retail, Marketing & Recommendation Systems 17.8 Case Studies from Industry ________________________________________ PART VII — ADVANCED TOPICS & FUTURE DIRECTIONS ________________________________________ Chapter 18: Formal Verification & Logic-Based Explainability VOL-2 18.1 Formal Logic for AI Models 18.2 Verifying ML Model Explanations 18.3 Symbolic Reasoning & Hybrid Systems 18.4 Proof Techniques for Interpretability 18.5 Logic-Based Explainability Frameworks 18.6 Specification of Transparency Constraints 18.7 Model Checking 18.8 Verified Explainability in Safety-Critical Systems ________________________________________ Chapter 19: Explainability for Large Language Models VOL-2 19.1 Mechanistic Interpretability 19.2 Attribution in Transformer Layers 19.3 Attention Head Analysis 19.4 Causal Tracing in LLMs 19.5 Interpreting Embeddings & Token Contributions 19.6 Safety & Alignment Through Explainability 19.7 Transparency Challenges in LLMs 19.8 Research Frontiers in LLM Interpretability ________________________________________ Chapter 20: Future of Explainable AI VOL-2 20.1 Causal + Explainable AI Integration 20.2 Neuro-Symbolic Interpretable Architectures 20.3 Self-Explaining and Rationalizing Models 20.4 Regulation-Driven Explainability (EU AI Act, India AI Ecosystem) 20.5 Explainability for Safety-Critical AI 20.6 Automated Explanation Generation 20.7 Human-Centered Explainable AI 20.8 Research Challenges & Open Problems

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub