AI Notes
Master Bayesian networks. DAG, conditional probability. Reasoning 2024.
Introduction
Bayesian networks are graphical models that represent probabilistic relationships among variables using directed acyclic graphs (DAGs). They provide a compact, intuitive way to encode joint probability distributions over many variables, enabling efficient reasoning under uncertainty. In the real world, most decisions must be made with incomplete information. Bayesian networks give AI systems a principled framework for combining prior knowledge with observed evidence to compute the probability of unobserved events.
Structure of a Bayesian Network
A Bayesian network consists of
1. Nodes: Random variables (can be discrete or continuous)
2. Directed edges: Represent direct probabilistic dependencies
3. Conditional probability tables (CPTs): Quantify relationships
Example: Student Exam Performance Network
Difficulty ──┐ Intelligence ──┐
│ │ │ │
▼ ▼ ▼ │
Grade ◄────┘ SAT Score ◄─────┘
│
▼
Recommendation Letter
Semantics
- Grade depends on Difficulty and Intelligence
- SAT depends on Intelligence
- Letter depends on Grade
- Difficulty and Intelligence are independent (no common parent)
Conditional Probability Tables
P(Difficulty)
| easy | 0.6 |
| hard | 0.4 |
P(Intelligence)
| low | 0.7 |
| high | 0.3 |
P(Grade | Difficulty, Intelligence):
| Diff | Intel | A | B | C |
|-------|-------|-----|-----|-----|
| easy | high | 0.9 | 0.08| 0.02|
| easy | low | 0.4 | 0.4 | 0.2 |
| hard | high | 0.6 | 0.3 | 0.1 |
| hard | low | 0.1 | 0.3 | 0.6 |
P(SAT | Intelligence):
| Intel | high_score | low_score |
|-------|------------|-----------|
| high | 0.8 | 0.2 |
| low | 0.2 | 0.8 |
Joint probability of any combination
P(D, I, G, S, L) = P(D) × P(I) × P(G|D,I) × P(S|I) × P(L|G)
Inference: Computing Probabilities from Evidence
Exact Inference by Enumeration
Variable Elimination
Types of Reasoning in Bayesian Networks
| Causal (top-down) | From causes to effects |
| Diagnostic (bottom-up) | From effects to causes |
| "Student got A. Exam was hard | intelligence probably high" |
| "Student got A. Exam was easy | intelligence not necessarily high" |
D-Separation: Conditional Independence
| Chain: A | B → C |
| Fork: A ← B | C |
| Collider: A | B ← C |
Applications
Medical Diagnosis: Model relationships between diseases, symptoms, and test results. Observe symptoms → infer most likely disease. Used in clinical decision support systems.
Fault Diagnosis: In complex systems (aircraft, power grids), model causal chains from faults to observable symptoms. When alarm triggers, compute most probable root cause.
Spam Filtering: Model relationships between email features (words, sender, links) and spam/ham classification. Update beliefs as new features observed.
Risk Assessment: Insurance, credit scoring, and project management use Bayesian networks to assess risk given partially observed factors.
Summary
Bayesian networks provide an elegant framework for representing and reasoning about uncertain knowledge. By combining graph structure (encoding independence assumptions) with probability theory (quantifying relationships), they enable efficient computation of posterior probabilities given evidence. The ability to perform causal, diagnostic, and intercausal reasoning makes them invaluable for AI systems operating in uncertain real-world environments where decisions must be made with incomplete information.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Bayesian Networks - Probabilistic.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Artificial Intelligence topic.
Search Terms
artificial-intelligence, artificial intelligence, artificial, intelligence, reasoning, and, inference, bayesian
Related Artificial Intelligence Topics